home *** CD-ROM | disk | FTP | other *** search
/ Kit PC World De Ampliacion De Windows 95 / Kit PC World de ampliacion de Windows 95.iso / internet / sweeper / samples / olecon~1 / controls / localize / locali~2.cpp < prev    next >
Text File  |  1995-11-25  |  4KB  |  143 lines

  1. //=--------------------------------------------------------------------------=
  2. // LocalizePPG.Cpp
  3. //=--------------------------------------------------------------------------=
  4. // Copyright  1995  Microsoft Corporation.  All Rights Reserved.
  5. //
  6. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF 
  7. // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO 
  8. // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A 
  9. // PARTICULAR PURPOSE.
  10. //=--------------------------------------------------------------------------=
  11. //
  12. // property page implementations for Localize control.
  13. //
  14. #include "IPServer.H"
  15.  
  16. #include "LocalObj.H"
  17. #include "LocalizePPG.H"
  18. #include "LocalizeCtl.H"
  19. #include "Resource.H"
  20. #include "Util.H"
  21.  
  22.  
  23. // for ASSERT and FAIL
  24. //
  25. SZTHISFILE
  26.  
  27. //=--------------------------------------------------------------------------=
  28. // Property Page messages
  29. //=--------------------------------------------------------------------------=
  30. // in addition to regular windows messages you'll receive for a dialog box,
  31. // you'll receive the following messages in your property page implementation:
  32. //
  33. // PPM_NEWOBJECTS:
  34. //    wParam = 0;
  35. //    lParam = (LPARAM)(HRESULT *)hr
  36. //
  37. //  - in this message, you should call FirstControl() to get a pointer to a
  38. //    control, and initialize the values in the property page dialog with
  39. //    values from the control object.  put results from the operation in
  40. //    the HRESULT pointed to by LPARAM.
  41. //
  42. // PPM_APPLY:
  43. //    wParam = 0;
  44. //    lParam = (LPARAM)(HRESULT *)hr
  45. //
  46. //  - this message is sent to your dialog whenever the user clicks APPLY or OK
  47. //    in the dialog.  you should have a loop with the following code in it:
  48. //
  49. //      for (pUnk = FirstControl(&dwCookie) ; pUnk; pUnk = NextControl(&dwCookie)) {
  50. //            hr = pUnk->QueryInterface(IID_IMyCtlInterface, (void **)&pMyCtl);
  51. //            // set properties here!!!
  52. //      }
  53. //
  54. //    call PropPageException() if there is an error while setting propertites
  55. //    to show the exception set up by the property set routine.
  56. //
  57. // PPM_EDITPROPERTY:
  58. //    wParam = dispid
  59. //    lParam = (LPARAM)(HRESULT *)hr
  60. //
  61. //  - sent to your dialog when somebody wants you to set the focus to a specific
  62. //    property [typically, one will see a call to this when one returns a page
  63. //    from IPerPropertyBrowsing::MapPropertyToPage].  you can use this
  64. //    to bring up dialogs, or do whatever flaps your flagella.
  65. //
  66.  
  67.  
  68. //=--------------------------------------------------------------------------=
  69. // CLocalizeGeneralPage::Create
  70. //=--------------------------------------------------------------------------=
  71. // global static creation function.
  72. //
  73. // Parameters:
  74. //    IUnknown *    - [in] controlling unknown
  75. //
  76. // Output:
  77. //    IUnknown *    - new prop page.
  78. //
  79. // Notes:
  80. //
  81. IUnknown *CLocalizeGeneralPage::Create
  82. (
  83.     IUnknown *pUnkOuter
  84. )
  85. {
  86.     return (IUnknown *)new CLocalizeGeneralPage(pUnkOuter);
  87. }
  88.  
  89. //=--------------------------------------------------------------------------=
  90. // CLocalizeGeneralPage::CLocalizeGeneralPage
  91. //=--------------------------------------------------------------------------=
  92. // constructor.
  93. //
  94. // Parameters:
  95. //    IUnknown *        - [in] controlling unknown.
  96. //
  97. // Notes:
  98. //
  99. CLocalizeGeneralPage::CLocalizeGeneralPage
  100. (
  101.     IUnknown *pUnkOuter
  102. )
  103. : CPropertyPage(pUnkOuter, OBJECT_TYPE_PPGLOCALIZEGENERAL)
  104. {
  105.     // initialize local variables here.
  106. }
  107.  
  108. //=--------------------------------------------------------------------------=
  109. // CLocalizeGeneralPage::~CLocalizeGeneralPage
  110. //=--------------------------------------------------------------------------=
  111. // destructor.
  112. //
  113. // Notes:
  114. //
  115. CLocalizeGeneralPage::~CLocalizeGeneralPage()
  116. {
  117.     // clean up
  118. }
  119.  
  120. //=--------------------------------------------------------------------------=
  121. // CLocalizeGeneralPage::DialogProc
  122. //=--------------------------------------------------------------------------=
  123. // our dialog proc.
  124. //
  125. // Parameters:
  126. //    - see win32sdk docs on DialogProc
  127. //
  128. // Notes:
  129. //
  130. BOOL CLocalizeGeneralPage::DialogProc
  131. (
  132.     HWND   hwnd,
  133.     UINT   msg,
  134.     WPARAM wParam,
  135.     LPARAM lParam
  136. )
  137. {
  138.     // TODO: add support for your property page here.  this is a normal dialog
  139.     //       proc.  make sure you handle PPM_NEWOBJECTS and PPM_APPLY.
  140.     //
  141.     return FALSE;
  142. }
  143.